package com.virgo.demo.system.converter;

import com.virgo.common.converter.BaseConverter;
import com.virgo.common.utils.ITimeUtils;
import com.virgo.demo.system.domain.AdminUserDo;
import com.virgo.demo.system.domain.vo.AdminUserVo;
import org.springframework.stereotype.Component;

@Component
public class AdminUserConverter extends BaseConverter<AdminUserDo, AdminUserVo> {

	@Override
	protected void convert(AdminUserDo from, AdminUserVo to) {
		to.setLastLoginAt(ITimeUtils.localDate(from.getLastLoginAt()));
		to.setCreatedAt(ITimeUtils.localDate(from.getCreatedAt()));
		to.setUpdatedAt(ITimeUtils.localDate(from.getUpdatedAt()));
		super.convert(from, to);
	}
}